from django.http import HttpResponse
from django.shortcuts import render

# Create your views here.
def show(request):
    """
    该函数是渲染index.html的
    :param request:
    :return:
    """
    # return HttpResponse('老张来了')
    return render(request,'index.html')


def forsub(request):
    """
    该函数是处理submit提交的函数.
    接受get或者post的内容
    :return:
    """
    uname=request.GET.get('uname')   #request.GET类似一个字段,所以表单中必须传入name
    pwd=request.GET.get('pwd')
    # print('登录人:{},')

    return HttpResponse('登录人:{},密码:{}'.format(uname,pwd))